﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MMOShared
{
    [Serializable]
    public class GameUpdatesAvailable
    {
        public UInt16[] AllUpdates { get; private set; }
        public UInt16 LatestVersion { get; private set; }
        public GameUpdatesAvailable(UInt16[] availableVersions)
        {
            AllUpdates = availableVersions;
            LatestVersion = availableVersions[availableVersions.Length - 1];
        }
    }
    [Serializable]
    public class GameUpdateRequest
    {
        public UInt16 VersionRequested { get; private set; }
        public GameUpdateRequest(UInt16 version)
        {
            this.VersionRequested = version;
        }
    }
    [Serializable]
    public class GameUpdatePackage
    {
        public int NumberOfPieces { get; private set; }
        public int NumberOfFiles { get; private set; }
        public int TotalSize { get; private set; }
        public UInt16 Version { get; private set; }
        public GameUpdatePackage(int numFiles, int numPieces, int totalSize, UInt16 version)
        {
            this.NumberOfFiles = numFiles;
            this.NumberOfPieces = numPieces;
            this.TotalSize = totalSize;
            this.Version = version;
        }
    }
}
